<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>	
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="icon" href="resources/img/favicon.png" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>MyGis | Custom your GIS >></title>
<meta name="description" content="">
<meta name="author" content="">

<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

<!-- Le styles -->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet"	href="resources/frontResources/bootstrap/css/bootstrap.css">
<!-- Latest compiled and minified JavaScript -->
<script src="resources/frontResources/bootstrap/js/bootstrap.min.js"></script>
<link	href="resources/frontResources/bootstrap/css/bootstrap-responsive.css"	rel="stylesheet">
<link href="resources/frontResources/bootstrap/css/jumbotron.css" rel="stylesheet">
	
<style type="text/css">
#map { 
border-radius:6px; 
-moz-border-radius:6px; /* Firefox */ 
-webkit-border-radius:6px; /* Safari y Chrome */ 

/* Otros estilos */ 
border:1px solid #CCC;
background:#eee;
width:100%;
padding:5px;
}
</style>	
<script src="http://openlayers.org/api/OpenLayers.js"></script>
<!--     <script src="../OpenLayers.js"></script> -->
<script type="text/javascript">
var map, layerOSM;
function init() {
	var longitude=-59.075108;
	var latitude=-37.30;
	var zoom=11;
	
	map = new OpenLayers.Map('map');
	layerOSM = new OpenLayers.Layer.OSM();
	var fromProjection = new OpenLayers.Projection("EPSG:4326"); // Transform from WGS 1984
	var toProjection = new OpenLayers.Projection("EPSG:900913"); // to Spherical Mercator Projection
	var initialPosition = new OpenLayers.LonLat(longitude,latitude).transform( fromProjection, toProjection);

	map.addLayer(layerOSM);
	map.setCenter(initialPosition,zoom);
}
</script>
</head>
<body onload="init();">
	<div class="navbar navbar-inverse navbar-fixed-top">
		<div class="container">
			<a class="navbar-brand" href="#">MyGIS</a>
			<div class="nav-collapse collapse">
				<form class="navbar-form form-inline pull-right" name='f' action="<c:url value='j_spring_security_check'/>" method='POST'>
					<input type="text" class="form-control btn-warning" name='j_username' placeholder="userName">
					<input type="password" class="form-control btn-warning" name='j_password' placeholder="Password">
					<button type="submit"  name="submit" value="submit" class="btn btn-warning">Ingresar</button>
				</form>
			</div>
		</div>
	</div>

	<c:if test="${not empty error}">
		<div class="container">
			<br>
			<div class="alert alert-danger" role="alert"><b>Upss! </b>Problemas al loguearte. Causa: ${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}</div>
		</div>
	</c:if>

	<div class="container">
		<!-- Main jumbotron for a primary marketing message or call to action -->
		<div class="jumbotron" style="margin-top: 0px;">
			<p>Hello, MyGIS | Custom your Gis</p>
			<div id="map"  style="width:100%;height:400px;"></div> 
			<p style="padding-top: 15px"><a class="btn btn-primary btn-large btn-warning">Learn more about MyGis</a></p>
		</div>
	</div>

	<div class="body-content" style="width: 100%; text-align: center; color: #CCCCCC; border-top: 1px solid #CCCCCC;">
		<footer>
			<p>MyGIS | Custom your Gis - 2013</p>
		</footer>
	</div>	
	
<!-- 	Modal -->
</body>
</html>